﻿@section title
{
    找回密码
}
@section pagetitle
{
    找回密码
}@section header
{
    <link rel="stylesheet" href="~/Themes/RongJi/Style/base/css/password.css">
}
@model RiderShop.Mobile.Modle.FindPasswordModel
<div class="userCenterHeader">
    <span class="iconWrapper">
        <img src="~/Themes/RongJi/Style/base/imgs/icon_mi.png">
    </span>
    <h3>找回密码</h3>
    <br class="clearfix">
</div>


<div class="box">
    <form action="~/Customer/GetPass" method="post" id="passForm">

        <h3>请输入要找回密码的帐号</h3>
        <input name="UserName" type="text" id="UserName" value="@Model.UserName" class="form-control" placeholder="请填写您的用户名、手机或邮箱">
        <div class="form-group verifycode-group">
            <input name="VerifyCode" type="text" id="VerifyCode" class="form-control" placeholder="验证码">
            <img class="verifyCode-img" id="imgVerifyCode" width="100" height="40">
        </div>
        <span class="err_msg">@Model.Message</span>
        <div class="mb20">
            <input id="btnSubmit" type="submit" class="btn btn-warning btn-block mt20" value="下一步" data-theme="a" data-role="button" />
        </div>
        <div class="clear"></div>
    </form>
</div>

@section footer
{
    <script type="text/javascript">
        $(function () {
            //让toolbar选中
            var $homeImg = $("#homeImg");
            var $categoryImg = $("#categoryImg");
            var $myaccountImg = $("#myaccountImg");
            var $searchImg = $("#searchImg");

            $homeImg.attr("src", "/Themes/RongJi/Style/base/imgs/f10.png");
            $categoryImg.attr("src", "/Themes/RongJi/Style/base/imgs/f2.png");
            $myaccountImg.attr("src", "/Themes/RongJi/Style/base/imgs/f3_c.png");
            $searchImg.attr("src", "/Themes/RongJi/Style/base/imgs/f4.png");

            refreshCode();
            $(".verifyCode-img").click(function () {
                refreshCode();
            });

            function refreshCode() {
                var img = document.getElementById("imgVerifyCode");

                if (img != null) {
                    var currentDate = new Date();
                    img.src = '/Customer/VerifyCodeImage?ref=1&t=' + currentDate.getTime();
                }
            }

            $("#btnSubmit").click(function () {
                if (!$("#UserName").val()) {
                    KevinShop.MessageBox.Alert("请输入帐号!");
                    return false;
                }

                if (!$("#VerifyCode").val()) {
                    KevinShop.MessageBox.Alert("请输入验证码!");
                    return false;
                }


                document.forms["passForm"].submit();
            });
        });
    </script>
}